import request from 'utils/request'

interface GetFaceListOption {
  routeName: string
  dzcode: string
  pageSize: number
  timestamp: string
  pageIndex: number
  stationName: string
  searchKey: string
  carNum: string
}

// 列表
export function getFaceList({ routeName, dzcode, pageSize, timestamp, pageIndex, stationName, searchKey, carNum }: GetFaceListOption) {
  return request({
    url: '/person/situation/getFaceList',
    method: 'GET',
    params: {
      routeName,
      dzcode,
      pageSize,
      timestamp,
      pageIndex,
      stationName,
      searchKey,
      carNum
    }
  })
}
interface GetFaceTopOption {
  dzcode: string
  totalType: number
}
// 人脸预警排行
export function getFaceTop({ dzcode, totalType }: GetFaceTopOption) {
  return request({
    url: '/person/situation/getFaceTop',
    method: 'GET',
    params: {
      dzcode,
      totalType
    }
  })
}

interface GetFaceTotalPerOption {
  dzcode: string
}
// 人脸预警分类统计
export function getFaceTotalPer({ dzcode }: GetFaceTotalPerOption) {
  return request({
    url: '/person/situation/getFaceTotalPer',
    method: 'GET',
    params: {
      dzcode
    }
  })
}
